import { MODULE_LIST, CUSTOM_GROUP } from "@/common";

export default function (store: any) {
  try {
    const moduleList = localStorage.getItem(MODULE_LIST);
    if (moduleList) {
      store.state.moduleList = JSON.parse(moduleList);
    }
    const customGroup = localStorage.getItem(CUSTOM_GROUP);
    if (customGroup) {
      store.state.customGroup = JSON.parse(customGroup);
    }
  } catch (e) {
    console.error("本地存储数据异常==", e);
  }
}
